import request from '@/request'
// 注册
export function register(data) {
  return request({
    url: '/login/register',
    method: 'post',
    data
  })
}

// 登录
export function login(data) {
  return request({
    url: '/login/sign',
    method: 'post',
    data
  })
}

// 测试
export function test(data) {
  return request({
    url: '/login/test',
    method: 'post',
    data
  })
}

// 新增一级菜单
export function addMainMenu(data) {
  return request({
    url: '/system/add/main/menu',
    method: 'post',
    data
  })
}

// 新增子级菜单
export function addMainMenuItem(data) {
  return request({
    url: '/system/add/main/menu/item',
    method: 'post',
    data
  })
}

// 获取所有菜单
export function getMainMenuAll(data) {
  return request({
    url: '/system/get/main/menu/all',
    method: 'post',
    data
  })
}

// 获取一级应用菜单
export function getMainMenu(data) {
  return request({
    url: '/system/get/main/menu',
    method: 'post',
    data
  })
}

// 删除一级应用菜单
export function deleteMainMenu(data) {
  return request({
    url: '/system/delete/main/menu',
    method: 'post',
    data
  })
}

// 详情一级应用菜单
export function infoMainMenu(data) {
  return request({
    url: '/system/info/main/menu',
    method: 'post',
    data
  })
}

// 删除子级菜单
export function deleteMainMenuChildren(data) {
  return request({
    url: '/system/delete/main/menu/children',
    method: 'post',
    data
  })
}

// 获取子级菜单信息
export function infoMainMenuChildren(data) {
  return request({
    url: '/system/info/main/menu/children',
    method: 'post',
    data
  })
}